"""
演示Python中的各类运算符
"""

# 算数（数学）运算符
print('3 + 3 = ', 3 + 3)  # 6
print('6 - 3 = ', 6 - 3)  # 3
print('6 * 6 = ', 6 * 6)  # 36
print('6 / 2 = ', 6 / 2)  # 3.0
print('11 // 2 = ', 11 // 2)  # 5（取整除）
print('9 % 2 = ', 9 % 2)  # 1（取余）
print('3 ** 3 = ', 3 ** 3)  # 27（指数）

print('--------------------')

# 赋值运算符
num = 1
num += 2
print(num)  # 3
num -= 1
print(num)  # 2
num *= 5
print(num)  # 10
num /= 2
print(num)  # 5.0
num //= 2
print(num)  # 2.0
num += num ** 3
print(num)  # 10.0
num %= 3
print(num)  # 1.0
num = 6
num **= 2
print(num)  # 36
